-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add IOPS and bytes preset variables to VOLUME usage type
#10326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IOPS and bytes preset variables to VOLUME usage type
#10326
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10326 +/- ##
============================================
+ Coverage 16.02% 16.03% +0.01%
- Complexity 13147 13161 +14
============================================
Files 5658 5659 +1
Lines 496312 496417 +105
Branches 60109 60109
============================================
+ Hits 79527 79600 +73
- Misses 407943 407968 +25
- Partials 8842 8849 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
...a/src/main/java/org/apache/cloudstack/quota/activationrule/presetvariables/DiskOffering.java
Outdated
Show resolved
Hide resolved
...a/src/main/java/org/apache/cloudstack/quota/activationrule/presetvariables/DiskOffering.java
Outdated
Show resolved
Hide resolved
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
@blueorangutan package |
|
@JoaoJandre a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12421 |
|
@rohityadavcloud @sureshanaparti @shwstppr could we run the CI here? |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-12391)
|
|
Merging as these tests failures are not related and are happening on every PR (see #10372 (comment), for example) |
) * Add bytes and iops preset variables to volume usage type * Add new line at the end of file Co-authored-by: dahn <[email protected]> * Change disk offering preset variable class name --------- Co-authored-by: Lucas Martins <[email protected]> Co-authored-by: dahn <[email protected]>
Description
This PR adds the following preset variables to the activation rules of
VOLUMEQuota tariffs:Disk Offering:
value.diskOffering.bytesReadRate: returns alongwith the bytes read rate of the disk offering;value.diskOffering.bytesReadBurst: returns alongwith the burst bytes read rate of the disk offering;value.diskOffering.bytesReadBurstLength: returns the length, in seconds, of the bytes read rate burst;value.diskOffering.bytesWriteRate: returns alongwith the bytes write rate of the disk offering;value.diskOffering.bytesWriteBurst: returns alongwith the burst bytes write rate of the disk offering;value.diskOffering.bytesWriteBurstLength: returns the length, in seconds, of the bytes write rate burst;value.diskOffering.iopsReadRate: returns alongwith the I/O requests read rate of the disk offering;value.diskOffering.iopsReadBurst: returns alongwith the burst I/O requests read rate of the disk offering;value.diskOffering.iopsReadBurstLength: returns the length, in seconds, of the IOPS read burst in seconds;value.diskOffering.iopsWriteRate: returns alongwith the I/O requests write rate of the disk offering;value.diskOffering.iopsWriteBurst: returns alongwith the burst I/O requests write rate of the disk offering;value.diskOffering.iopsWriteBurstLength: returns the length, in seconds, of the IOPS write burst.Volume:
value.volumeType: the volume type. Values can be:UNKNOWN,ROOT,SWAP,DATADISKandISO.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
First, I executed the
quotaPresetVariablesListAPI using the parameterusagetype=6, and it listed all the new preset variables.Then, in the
Create Quota Tariffform, I checked if the presets were available for different usage types by using them in an activation rule and pressing theValidate activation rulebutton. As expected, theVOLUMEusage type was the only one that didn't result in an error.Finally, for each preset variable, I created a tariff using them, and the tariff was applied in every case, as expected.